package ink.xiaobaibai.entity;

import com.baomidou.mybatisplus.annotation.*;
import ink.xiaobaibai.common.RoomNumberHandler;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author xiaobaibai
 * @since 2021-09-10
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("product_device")
public class ProductDevice implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 机器产品表自增主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 机器名称
     */
    @TableField("name")
    @NotNull
    private String name;

    /**
     * 机器型号
     */
    @TableField("type")
    @NotNull
    private String type;

    /**
     * 机器介绍
     */
    @TableField("detail")
    @NotNull
    private String detail;

    /**
     * 机器图片地址(多张)
     */
    @TableField(value = "image_urls", typeHandler = RoomNumberHandler.class)
    @NotNull
    private List<String> imageUrls;

    /**
     * 备注
     */
    @TableField("remarks")
    private String remarks;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;


}
